Properties

Name Returns Notes Example
currentProfile Profile
groups List All groups in this account
openGroups List Returns all groups in this account which are open (but not the "public" group)
dynamicGroups List Returns all dynamic (ie rules based) groups
matchMethods List
pendingApplications List Return the list of membership applications which the current user is permitted to process
allRoles List Returns a list of available roles for the current account
availableRoles Map Returns a map of Role objects, keyed on the role identifier. This returns Roles from all apps currently active for the account

Methods

Name Returns Notes Example
checkValidPassword ( password, profile ) boolean Checks to see if the password is valid, ie complies with all password complexity policies attached to the profile
checkValidPassword ( password, profile, narrative ) boolean Checks to see if the password is valid, ie complies with all password complexity policies attached to the profile
isSecondFactorAuthentificationEnabled ( profile ) Boolean
temp2FACode ( profile ) Temp2FAData
save2FACode ( profile, secretKey, userCode2FA ) void
disable2FA ( profile ) void
blockEntity ( block, blockUntilDate ) AccessBlock
findActiveBlocksForEntity ( block ) List
findBlocksForEntity ( block ) List
findBlockById ( id ) AccessBlock
deleteBlock ( ab ) void
findRole ( role ) Role
addRoleToGroupForOrg ( foundRole, group, org ) GroupRole
addRoleToGroupForOwnOrg ( foundRole, group ) GroupRole
newProfileBuilder ( ) ProfileBuilder Creates an instance of a ProfileBuilder which is a convenient way to create new Profiles Set properties on the ProfileBuilder and then call its build() method to create the profile
removeLoginIds ( forUser, nonces ) int
deleteMembership ( membership ) void
isInHomeOrg ( profile ) boolean Check to see if the given profile has the current account as its home admin org, or if its home admin org is within the current account
verifyPassword ( user, password ) boolean Verify that the provided password matches that saved.
Use this with login(Profile) to implement a custom login process
login ( profile ) void Sets login cookies for the current request to login the given user
loginToken ( website, branch, profile, path ) ExtUrl Returns a ExtUrl, where object1 is the URL including login tokens for the given website and branch, and object2 is the domain name used in the URL and which the login tokens are valid for
loginToken ( profile ) String
findEntityById ( id ) BaseEntity
membershipListForOrg ( orgPart ) MembershipList
membershipList ( profileBeans ) MembershipList
membershipListForProfiles ( profiles ) MembershipList
members ( profiles ) List Load the list of GroupMembership for the given profiles efficiently
membershipList ( p ) MembershipList Return a MembershipList with memberships for the given profile. This provides methods to allow filtering by group, organisation, etc
This excludes expired memberships
membershipListForGroup ( group ) MembershipList Get MembershipList from a group
membershipListForGroup ( groupName ) MembershipList Get MembershipList from a group code
findAddresses ( entity ) List Find all addressess associated with the given entity (user or organisation)
findAllAddresses ( entity ) Map Returns all addresses which are applicable for the given entity. This is broader then findAddresses because for users it will include the addresses of their orgs, and it will include the address on the org itself plus any EntityAddress records associated with it
findAllAddresses ( entity, includeRelated ) Map Returns all addresses which are applicable for the given entity. This is broader then findAddresses because for users it will include the addresses of their orgs, and it will include the address on the org itself plus any EntityAddress records associated with it
findAddress ( profile, entityAddressId ) EntityAddress Find an address specified by the ID of the entity address (not the Address itself) for a given entity Returns null if the EntityAddress does not exist, or is not associated with the given entity
updateAddress ( profile, rc ) EntityAddress Update or create profile address
updateAddress ( profile, entityAddressId, rc, type ) EntityAddress
findAllMembershipApplications ( profile ) List
findPendingMembershipApplications ( profile ) List
createUser ( email, nickName ) Profile
extraFields ( p ) Map
extraFields ( p, primaryOnly ) Map
updateProfile ( p, context ) Profile update given profile with given form context
updateProfileStatus ( profile, enable ) void
extraFieldValues ( p ) Map
extraFields ( bean ) Map
extraFieldValue ( bean, fieldName ) String
updateUser ( p ) void Just saves any updates to the profile object, and triggers a reindex of it
storeExtrFields ( gm, parameters ) void Saves custom fields for a single membership.Assumes fields are in the params map with the same field as defined on the membership group
storeExtrFields ( p, parameters ) void Assumes fields are named as MEMBERSHIPID.FIELDNAME, eg name="43653.favColour"
extraFieldDefinitions ( group ) List Get the list of custom/extra field defiitions for the given group
saveToFieldSet ( extraFields, parameters, files ) NvSet Save the given values to a Name/Value field set. Use extraFieldDefinitions(group) to get the list of field definitions
group ( groupName ) Group
group ( id ) Group
getGroups ( ) List All groups in this account
findGroupPasswordPolicies ( group ) List
findPasswordPolicyDescription ( passwordPolicy ) String
findOrg ( orgId ) Organisation
findOrg ( id ) Organisation
findOrgTypeByName ( sOrgType ) OrgType
findOrgTypeById ( id ) OrgType
findBaseEntity ( id ) BaseEntity
findOrCreateMembership ( profile, group, org ) GroupMembership Find a membership which matches the profile, org and group, and if none exist create it. Return either the found or created membership. When this creates a membership it will also create a SignupLog and will fire events
findOrCreateMembership ( profile, group, org, membershipCreatedCallback ) GroupMembership This overload allows passing in a callback, which gets called with the GroupMembership and SignupLog. This is called prior to event processing, so is a good place to store extra fields etc which might be used by event processing, eg sending emails etc
updateMembership ( membership, newGroup, newOrg ) void Update membership
newMembershipApplication ( profile, group, org, form ) GroupMembershipApplication
createOptinLog ( profile, group ) OptInLog
findByName ( name ) Profile
findByEmail ( email ) Profile
findById ( id ) Profile Lookup a Profile by its internal ID (not username). This will only return profiles which are enabled, and have the current org as their home account
findMatchingProfiles ( request ) List
findMatching ( request ) List Find any enabled profiles with either phone or email
findMatching ( included, excluded ) List
newProfileMatchRequest ( ) ProfileMatchRequest Create a new match request object. You can then set search values on that object, and use it to call the findMatching method
numProfiles ( q, org, searchGroup ) Long
processOptIns ( profile, group, parameters ) void
findOptins ( group ) List Get the list of configured list of OptIn for the given group
findChildMembershipByField ( groupName, fieldName, ovalue, contains ) MembershipBean
mergeProfiles ( mergeDestination, mergeSources ) void
mergeProfiles ( mergeDest, mergeSources ) int
groups ( ) List Find all groups (not soft deleted) for the current admin domain
orgTypes ( ) List Return all org types for the current admin domain
toProfileBean ( p ) ExtProfileBean
toOrgData ( org ) OrgData
toOrg ( od ) Organisation
toOrgList ( orgDatas ) List
findHighest ( orgs ) Organisation Find the organisation highest in the org hierarchy, ie the one with the fewest parent orgs
members ( group, org ) List Find users (profiles) within a given gruop for a given organisation (ie team) DEPRECATED: this doesnt evaluate dyamic groups, use findMembers
findMembers ( group ) List Uses GroupManager, so dynamic and normal groups are handled correctly
numMembers ( group ) Long Find the number of members in the given group. This may be physical or a dynamic group
members ( group, props ) List
memberships ( org ) List Find all members for given org
memberships ( group, org ) List
memberships ( profile, org ) List
memberships ( profile, group ) List
memberships ( profile, teamOrgType ) List
setMembershipField ( membershipBean, fieldName, fieldValue ) void
findDuplicates ( matchMethod, mode ) List
findGroupByName ( groupName ) Group
findGroupById ( id ) Group
findByOrg ( team ) List
findByOrgType ( ot ) List
hasAdminUserRole ( memberOrg ) boolean Helper method to determine if the current user has admin role
processPending ( gma, b ) void
setPassword ( user, newPassword ) void
generatePasswordReset ( user, website ) PasswordReset Generate passwordReset object for generating password reset token
findPasswordReset ( token, website ) PasswordReset
findPasswordReset ( profile, token, website ) PasswordReset
updateProfilesForOrg ( org ) void Update profiles index for all profiles with memberships to the given org
isPhoneUniqueEnabled ( ) boolean Returns true if the account has unique phone number enabled
getAllRoles ( ) List Returns a list of available roles for the current account
submitMembershipApplicationRequest ( mar ) GroupMembershipApplication
membershipOrgProperties ( gma ) Map
findUnsubs ( p ) List Returns unsubscribes linked to the given profile OR its email address
hasOrgType ( org, expectedOrgType ) boolean
createRulesGroup ( name, title, json ) Group
createGroup ( name, title, groupType, regoMode ) Group Create a Group with the given name and properties Throws an exception if a group with the given name already exists
newConfigMessage ( level, message ) ConfigMessage
findNonces ( profile, start, finish ) List
findAuditStats ( p ) Map Returns the number of changes to the given item by Date
findAuditItems ( p, max ) List
hasCredentials ( p ) boolean Returns true if the user has a password or other credential
isValidUserName ( value ) boolean
findPasswordReset ( profile, website, shortCode ) PasswordReset
generatePasswordReset ( user, website, shortCode ) PasswordReset
subscriptionAction ( action ) SubscriptionAction Get enum SubscriptionAction from string value
homeAdminOrgInfo ( p ) HomeOrgInfo
findPrimaryMemberships ( p ) MembershipList